﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Max.PH5_2006.ShoppingSite.IService
{
    //访问修饰符
    //public
    //private
    //protected
    //internal
    //protected internal

    public interface IBaseService<TEntity,TInputDto,TOuputDto>  where TEntity: class,new()
    {
        int Add(TInputDto t);
        int Delete(List<dynamic> ids);
        int Update(TInputDto t);
        List<TOuputDto> Query();
        List<TOuputDto> Query(Expression<Func<TEntity, bool>> where);
        List<TOuputDto> Query(Expression<Func<TEntity, bool>> where, int pageIndex,int pageSize, out int count);
        List<TOuputDto> Query<TKey>(Expression<Func<TEntity, bool>> where,
            Expression<Func<TEntity, TKey>> order, bool isAsc, int pageIndex, int pageSize, out int count);
        TOuputDto QueryById(string id);
    }
}
